import java.net.URL;


public class myLink
{
	/**
	 * <a .. href
	 * <img .. src= 
	 * <form .. action
	 * <input .. src=
	 * <td .. background
	 * Look for anchor OR http:// OR /xyz
	 * for last case you need to add the base URL
	**/
	String str_urlName; //String sourceTag; // html tag
	String str_baseUrl;
	
	int int_sourceElement; // 0 http://, 1 href =, 2 src =
	int int_type; //complete =1; relative =2
	int int_referals;
	
	public myLink(String base, String url, String source)
	{
		int_referals = 0;
		str_baseUrl = base;
		initiliaze_Source(source);
		
		if(base.startsWith("http://"))
		{
			int_type = 2;
			str_urlName = url;
		}
		
		if(base.startsWith(base))
		{
			
		}
	}
	
	protected void initiliaze_Source(String source)
	{
		if(source.equals(Constants.HTTP_PATTERN))
			int_sourceElement = 0;
		else if (source.equals(Constants.HREF_PATTERN))
			int_sourceElement = 1;
		else if (source.equals(Constants.SOURCE_PATTERN))
			int_sourceElement =2;		
	}
}
